| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | import {toLowerCase, trim, removeSpaces, replace, transliterate} from './strman'; |
||
| 12 | const slugify = (value) => { |
||
| 13 | |||
| 14 | let result = value; |
||
| 15 | result = toLowerCase(result); |
||
| 16 | result = trim(result); |
||
| 17 | result = removeSpaces(result, '-'); |
||
| 18 | result = replace(result, '&','-and-'); |
||
| 19 | result = transliterate(result); |
||
| 20 | result = replace(result, '[^\\w\\-]+', ''); |
||
| 21 | result = replace(result, '\-\-+','-'); |
||
| 22 | |||
| 23 | return result; |
||
| 24 | }; |
||
| 25 | |||
| 27 |